package com.cmse.service;

import java.util.List;

import com.cmse.persistence.enmu.FetchOrderType;

/**
 * @author wulibin, exceptsky@gmail.com, 2012-3-15 下午12:54:18
 * 
 */
public interface IBaseService<T> {
	public void add(T entity);
	
	public void delete(long id);
	
	public void deleteBatch(long ids[]);
	
	public T get(long id);
		
	public long getCountByCondition(T expEntity);
	
	public long getTotalCount();
	
	/*page 从第0页开始*/
	public List<T> getPage(int page, FetchOrderType orderType);
	
	public List<T> getAll(FetchOrderType orderType);
	
	public List<T> getByCondition(T expEntity, int page, FetchOrderType orderType);
	
	public void update(T entry);
}
